package board;

import java.io.Serializable;
import java.util.HashMap;
import java.util.LinkedList;

import beans.Move;

/**
 * A class containing the game information, the moves and the position of the board after those moves.
 * @author Josep M Sobrepere
 *
 */
public class Game implements Serializable{
	
	/**
	 * 
	 */
	private Board board;
	/**
	 * 
	 */
	private HashMap<String, String> info;
	/**
	 * 
	 */
	private LinkedList<Move> moves;
	/**
	 * 
	 */
	private String rawGame;
		
	/**
	 * @param info the information of the game that can be found at the beginning of the pgn file 
	 * @param moves a list with the moves of the game
	 * @param board the board with all the moves registered
	 * @param rawGame the pgn raw game
	 */
	public Game(HashMap<String, String> info,
			LinkedList<Move> moves, Board board, String rawGame) {
		super();
		this.board = board;
		this.info = info;
		this.moves = moves;
		this.rawGame= rawGame;
	}
	
	/**
	 * @return the PGN raw game
	 */
	public String getRawGame() {
		return rawGame;
	}

	/**
	 * @param rawGame sets the PGN raw game
	 */
	public void setRawGame(String rawGame) {
		this.rawGame = rawGame;
	}

	/**
	 * @return the Board
	 */
	public Board getBoard() {
		return board;
	}
	/**
	 * @param board sets the board
	 */
	public void setBoard(Board board) {
		this.board = board;
	}
	/**
	 * @return the info of the game
	 */
	public HashMap<String, String> getInfo() {
		return info;
	}
	/**
	 * @param info sets the info of the game
	 */
	public void setInfo(HashMap<String, String> info) {
		this.info = info;
	}
	/**
	 * @return the moves of the game
	 */
	public LinkedList<Move> getMoves() {
		return moves;
	}
	/**
	 * @param moves sets the moves of the game
	 */
	public void setMoves(LinkedList<Move> moves) {
		this.moves = moves;
	}

}
